package com.example.cloud.alibaba.seata.common.feign;


import com.example.cloud.alibaba.seata.common.dto.OrderDTO;
import com.example.cloud.alibaba.seata.common.feign.fallback.RemoteOrderServiceFallback;
import com.example.cloud.alibaba.seata.common.utils.SimpleMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: lidong
 * @Description 订单服务接口
 * @Date Created in 2019/9/5 16:28
 */
@FeignClient(value = "openFegin-order-example", contextId = "orderServiceClient",fallbackFactory = RemoteOrderServiceFallback.class)
public interface IOrderService {

    /**
     * 创建订单
     */
    @PostMapping("/order/create_order")
    SimpleMessage<OrderDTO> createOrder(@RequestBody OrderDTO orderDTO);
}
